package com.hjj.springboot.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

@TableName("t_search")
@Data
public class Search {

    @ExcelProperty("商品搜索编号")
    @ColumnWidth(20)
    private Integer id;

    @ExcelProperty("商品编号")
    @ColumnWidth(20)
    private Integer gId;

    @ExcelProperty("搜索次数")
    @ColumnWidth(20)
    private Integer count=0;

    @ExcelProperty("最近搜索时间")
    @ColumnWidth(20)
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    private Date lastSearchTime;

    @ExcelIgnore
    @TableField(exist = false,select = false)
    private Product product;
}
